package com.designpatterns.proxy.proxy;

import com.designpatterns.proxy.RealSubject.ObjectImpl;
import com.designpatterns.proxy.subject.Object;

/**
 * ProxyObject Class Impletmnets Object Interface
 *
 * @author Haiqi.Wang
 * @since 2013-6-8下午8:13:26
 */
public class ProxyObject implements Object {

	Object obj;
	
	public ProxyObject() {
		System.out.println("这是代理类");
		obj = new ObjectImpl();
	}
	
	@Override
	public void action() {
		System.out.println("代理开始");
		obj.action();
		System.out.println("代理结束");
	}
}
